﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CourseSystem.Core.Entities.RadioChoicesInfo>>" %>
<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<% var rid = ViewData["Rid"].CheckInt(0); %>
<% using (Html.BeginForm("RadioChoices","AdminExamLib",new{id = rid}, FormMethod.Post))
   {%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
    <tr name="firContent" class="box06">
        <td width="50%" align="center">
            选项
        </td>
        <td width="20%" align="center">
            是否答案
        </td>
        <td width="15%" align="center">
            操作
        </td>
    </tr>
    <%= Html.Hidden("chkAll") %>
    <% int i = 1;

       foreach (var item in Model)
       { %>
    <tr name="content"  class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
        bgcolor="#FFFFFF">
        <%= Html.Hidden("hidId", item.Id) %>
        <td>
            <%= Html.TextBox("txtTitle", item.Title, new {@style = "width:100%"}) %>
        </td>
        <td align="center">
          <input id="chk" name="chk" type="checkbox" <%=item.IsAnswer?"checked":"" %> />
        </td>
        <td align="center">
            <a href="javascript:void(0);" onclick="delTr(this);">删除</a>
        </td>
    </tr>
    <% } %>
</table>
<table width="98%" height="7" border="0" align="center" cellpadding="0" cellspacing="0"
    bordercolor="#FFFFFF">
    <tr>
        <td class="gray12">
            &nbsp;
        </td>
        <td align="right" class="gray12">
            <%= Html.AjaxPager(Model,
                                         new PagerOptions()
                                             {
                                                 ContainerTagName = "span",
                                                 CssClass = "mvcPager",
                                                 PageIndexParameterName = "pid",
                                                 ShowMorePagerItems = false,
                                                 AlwaysShowFirstLastPageNumber = true,
                                             }, new AjaxOptions() {UpdateTargetId = "listDiv"}) %>
            共<%= Model.TotalItemCount %>条记录，页<%= Model.CurrentPageIndex %>/<%= Model.TotalPageCount %>
        </td>
    </tr>
</table>
<% }%>
